package cc.tuhaolicai.mt.user.mobile.validator;

import com.jfinal.core.Controller;

/**
 * @version V1.0
 * @Title： UserValidator
 * @Package： cc.tuhaolicai.mt.user.model.DO
 * @Description： 用户model校验
 * @author： nan
 * @date： 2017-06-20 13:50
 */
public class UserValidator extends BaseValidator {
    @Override
    protected void validate(Controller controller) {
//        validateLong("userModel.id", GlobalConstant.VALIDATOR_ERRORKEY, "主键类型错误");
//        validateEmail("userModel.emali", GlobalConstant.VALIDATOR_ERRORKEY, "邮箱格式错误!");
//        validateDate("userModel.lastLoginDate", GlobalConstant.VALIDATOR_ERRORKEY, "时间格式错误!");
//        validateDate("userModel.registerDate", GlobalConstant.VALIDATOR_ERRORKEY, "时间格式错误!");
//        validateDate("userModel.accountModel.payPlatformAuthDate", GlobalConstant.VALIDATOR_ERRORKEY, "时间格式错误!");
//        validateDate("userModel.accountModel.payPlatformRegisterDate", GlobalConstant.VALIDATOR_ERRORKEY, "时间格式错误!");
        validateRegex("userModel.userName", "^[1]([0-9]{2})[0-9]{8}$", "msg", "手机号码格式错误！");
        validateRequired("userModel.passWord", "msg", "请输入密码！");
    }
}
